// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:53:56


// Source File Name:   j0.java

package com.zelix;

import java.awt.*;
import java.io.PrintStream;
import java.util.*;


//            d0, f0, k0, gs

public class j0
    implements LayoutManager2, k0
{

    static final String a = System.getProperty(z(z("NKC_PQG][\fCVBH")));
    private Hashtable b;
    private Hashtable c;
    private Hashtable d;
    private Container e;
    private String f[];
    private boolean g;
    private f0 h[];
    private Integer i;
    private Integer j;
    private Integer k;
    private Integer l;
    private Integer m;
    private Integer n;
    private boolean o;
    private boolean p;
//    public static int q;
    private static String z[];

    public j0(Container container)
    {
        b = new Hashtable();
        c = new Hashtable();
        h = new f0[4];
        e = container;
    }

    public void addLayoutComponent(Component component, Object obj)
    {
        synchronized(component.getTreeLock())
        {
            if(!(obj instanceof String))
                throw new IllegalArgumentException(z[28]);
            String s = (String)obj;
            Component component1 = (Component)b.put(s, component);
            if(component1 != null)
                a(z[16] + s + z[18] + component1 + z[17] + component);
            c.put(component, new d0(s, component, this));
        }
    }

    public void addLayoutComponent(String s, Component component)
    {
        synchronized(component.getTreeLock())
        {
            Component component1 = (Component)b.put(s, component);
            if(component1 != null)
                a(z[16] + s + z[18] + component1 + z[17] + component);
            c.put(component, new d0(s, component, this));
        }
    }

    public Dimension a(Container container, Integer integer, Integer integer1)
    {
        Insets insets;
        int i1;
        int j1;
        int k1;
        Vector vector;
        int i3;
        i3 = q;
        c();
        insets = container.getInsets();
        i1 = -1;
        j1 = -1;
        if(integer != null)
            i1 = integer.intValue();
        if(integer1 != null)
            j1 = integer1.intValue();
        if(i1 != -1 && j1 != -1)
            break MISSING_BLOCK_LABEL_414;
        k1 = container.getComponentCount();
        vector = new Vector(k1);
        a(container, vector, false);
_L5:
        boolean flag;
        int l1;
        flag = false;
        l1 = 0;
        if(i3 == 0) goto _L2; else goto _L1
_L1:
        Component component = (Component)vector.elementAt(l1);
        d0 d0_1 = (d0)c.get(component);
        flag = d0_1.a() ? true : flag;
        l1++;
_L2:
        if(l1 < vector.size()) goto _L1; else goto _L3
_L3:
        if(flag) goto _L5; else goto _L4
_L4:
        int i2;
        int j2;
        int k2;
        int l2;
        l1 = 0;
        if(m != null)
            l1 = m.intValue();
        i2 = 0;
        if(n != null)
            i2 = n.intValue();
        j2 = 0;
        k2 = 0;
        l2 = 0;
        if(i3 == 0) goto _L7; else goto _L6
_L6:
        Component component1 = container.getComponent(l2);
        d0 d0_2 = (d0)c.get(component1);
        if(!d0_2.g())
            a(z[29] + d0_2 + "'");
        Point point = d0_2.c();
        point.x += Math.max(d0_2.e(), l1);
        point.y += Math.max(d0_2.b(), i2);
        if(point.x > j2)
            j2 = point.x;
        if(point.y > k2)
            k2 = point.y;
        l2++;
_L7:
        if(l2 < k1) goto _L6; else goto _L8
_L8:
        if(i1 == -1)
            i1 = j2;
        if(j1 == -1)
            j1 = k2;
        if(k != null)
            i1 = Math.max(i1, k.intValue());
        if(l != null)
            j1 = Math.max(j1, l.intValue());
        Dimension dimension = new Dimension(i1 + insets.left + insets.right, j1 + insets.top + insets.bottom);
        dimension;
        if(gs.b != 0)
            q = ++i3;
        return;
    }

    void a(String s)
    {
        String s1 = z[25] + b() + z[24] + a + s;
        System.err.println(a + s1);
        System.exit(1);
        throw new RuntimeException(s1);
    }

    Dimension a()
    {
        Insets insets = e.getInsets();
        Dimension dimension = e.getSize();
        dimension.width -= insets.left + insets.left;
        dimension.height -= insets.top + insets.bottom;
        if(k != null)
            dimension.width = Math.max(dimension.width, k.intValue());
        if(l != null)
            dimension.height = Math.max(dimension.height, l.intValue());
        return dimension;
    }

    f0 b(String s)
    {
        return (f0)d.get(s);
    }

    d0 c(String s)
    {
        Object obj = b.get(s);
        if(obj == null)
            a(z[31] + s + z[30]);
        return (d0)c.get(obj);
    }

    public float getLayoutAlignmentX(Container container)
    {
        return 0.5F;
    }

    public float getLayoutAlignmentY(Container container)
    {
        return 0.5F;
    }

    static int d(String s)
    {
        if(s.equals(z[6]))
            return 0;
        if(s.equals(z[7]))
            return 1;
        if(s.equals(z[9]))
            return 2;
        if(s.equals(z[12]))
            return 4;
        if(s.equals(z[5]))
            return 3;
        if(s.equals(z[4]))
            return 5;
        if(s.equals(z[11]))
            return 6;
        if(s.equals(z[13]))
            return 7;
        if(s.equals(z[8]))
            return 8;
        if(s.equals(z[15]))
            return 9;
        if(s.equals(z[14]))
            return 10;
        return !s.equals(z[10]) ? -1 : 11;
    }

    static String a(int i1)
    {
        switch(i1)
        {
        case 0: // '\0'
            return z[6];

        case 1: // '\001'
            return z[7];

        case 2: // '\002'
            return z[9];

        case 4: // '\004'
            return z[12];

        case 3: // '\003'
            return z[5];

        case 5: // '\005'
            return z[4];

        case 6: // '\006'
            return z[11];

        case 7: // '\007'
            return z[13];

        case 8: // '\b'
            return z[8];

        case 9: // '\t'
            return z[15];

        case 10: // '\n'
            return z[14];

        case 11: // '\013'
            return z[10];
        }
        return null;
    }

    int b(int i1)
    {
        Dimension dimension = a();
        switch(i1)
        {
        case 2: // '\002'
        case 3: // '\003'
            return 0;

        case 1: // '\001'
        case 4: // '\004'
            return dimension.height;

        case 0: // '\0'
        case 5: // '\005'
            return dimension.width;

        case 6: // '\006'
            return dimension.width / 2;

        case 7: // '\007'
            return dimension.height / 2;
        }
        a(z[27] + a(i1) + z[26]);
        return -1;
    }

    public String b()
    {
        return z[33];
    }

    private void c()
    {
        Enumeration enumeration;
        int i1;
        i1 = q;
        if(!o || p)
            return;
        enumeration = c.elements();
        if(i1 == 0) goto _L2; else goto _L1
_L1:
        d0 d0_1 = (d0)enumeration.nextElement();
        d0_1.i();
_L2:
        if(!enumeration.hasMoreElements())
        {
            o = false;
            return;
        }
        if(true) goto _L1; else goto _L3
_L3:
    }

    public void invalidateLayout(Container container)
    {
        c();
    }

    public void layoutContainer(Container container)
    {
        int j1 = q;
        Object obj = container.getTreeLock();
        obj;
        JVM INSTR monitorenter ;
        Vector vector;
        StringBuffer stringbuffer;
        int i1;
        d();
        c();
        vector = new Vector(container.getComponentCount());
        a(container, vector, true);
        if(vector.size() <= 0)
            break MISSING_BLOCK_LABEL_156;
        stringbuffer = new StringBuffer();
        i1 = 0;
        if(j1 == 0) goto _L2; else goto _L1
_L1:
        d0 d0_1 = (d0)c.get(vector.elementAt(i1));
        stringbuffer.append(a + d0_1.j());
        i1++;
_L2:
        if(i1 < vector.size()) goto _L1; else goto _L3
_L3:
        a(z[32] + stringbuffer.toString());
        obj;
        JVM INSTR monitorexit ;
          goto _L4
        obj;
        JVM INSTR monitorexit ;
        throw ;
_L4:
    }

    public Dimension maximumLayoutSize(Container container)
    {
        return new Dimension(0x7fffffff, 0x7fffffff);
    }

    public Dimension minimumLayoutSize(Container container)
    {
        synchronized(container.getTreeLock())
        {
            d();
            Integer integer = k == null ? i : k;
            Integer integer1 = l == null ? j : l;
            Dimension dimension1 = a(container, integer, integer1);
            Dimension dimension = dimension1;
            return dimension;
        }
    }

    public Dimension preferredLayoutSize(Container container)
    {
        synchronized(container.getTreeLock())
        {
            d();
            Dimension dimension = a(container, i, j);
            return dimension;
        }
    }

    public void removeLayoutComponent(Component component)
    {
        synchronized(component.getTreeLock())
        {
            b.remove(component);
        }
    }

    private void a(Container container, Vector vector, boolean flag)
    {
        Insets insets;
        int i1;
        int j1;
        int l1;
        l1 = q;
        o = true;
        p = true;
        insets = container.getInsets();
        i1 = container.getComponentCount();
        j1 = 0;
        if(l1 == 0) goto _L2; else goto _L1
_L1:
        vector.addElement(container.getComponent(j1));
        j1++;
_L2:
        if(j1 < i1) goto _L1; else goto _L3
_L3:
        boolean flag1 = true;
        if(l1 == 0) goto _L5; else goto _L4
_L4:
        Vector vector1;
        int k1;
        flag1 = false;
        vector1 = (Vector)vector.clone();
        k1 = 0;
        if(l1 == 0) goto _L7; else goto _L6
_L6:
        Component component = (Component)vector1.elementAt(k1);
        d0 d0_1 = (d0)c.get(component);
        if(d0_1 != null)
        {
            if(d0_1.b(flag))
                flag1 = true;
            if(!d0_1.a(flag) || !d0_1.g())
                continue;
            vector.removeElement(component);
            if(!flag)
                continue;
            Dimension dimension = d0_1.d();
            Point point = d0_1.f();
            component.setBounds(point.x + insets.left, point.y + insets.top, dimension.width, dimension.height);
            if(l1 == 0)
                continue;
        }
        vector.removeElement(component);
        k1++;
_L7:
        if(k1 < vector1.size()) goto _L6; else goto _L5
_L5:
        if(!flag1)
        {
            p = false;
            return;
        }
        if(true) goto _L4; else goto _L8
_L8:
    }

    private void d()
    {
        int i1;
        int j1;
        j1 = q;
        if(g)
            return;
        i1 = 0;
        if(j1 == 0) goto _L2; else goto _L1
_L1:
        if(h[i1] != null && h[i1].a(false))
            switch(i1)
            {
            default:
                break;

            case 0: // '\0'
                i = new Integer(h[i1].a());
                if(j1 == 0)
                    break;
                // fall through

            case 1: // '\001'
                j = new Integer(h[i1].a());
                if(j1 == 0)
                    break;
                // fall through

            case 2: // '\002'
                k = new Integer(h[i1].a());
                if(j1 == 0)
                    break;
                // fall through

            case 3: // '\003'
                l = new Integer(h[i1].a());
                break;
            }
        i1++;
_L2:
        if(i1 >= h.length)
        {
            g = true;
            return;
        }
        if(true) goto _L1; else goto _L3
_L3:
    }

    public void e(String s)
    {
        StringTokenizer stringtokenizer;
        String as[];
        int i1;
        int j1;
        j1 = q;
        stringtokenizer = new StringTokenizer(s, ";");
        as = new String[stringtokenizer.countTokens()];
        i1 = 0;
        if(j1 == 0) goto _L2; else goto _L1
_L1:
        as[i1] = stringtokenizer.nextToken().trim();
        i1++;
_L2:
        if(i1 >= as.length)
        {
            a(as);
            return;
        }
        if(true) goto _L1; else goto _L3
_L3:
    }

    public void a(String as[])
    {
        int i1;
        int k2;
        k2 = q;
        f = as;
        d = new Hashtable();
        i = null;
        j = null;
        k = null;
        l = null;
        m = null;
        n = null;
        i1 = 0;
        if(k2 == 0) goto _L2; else goto _L1
_L1:
        int l2 = gs.b;
        gs.b = ++l2;
_L10:
        StringTokenizer stringtokenizer;
        int k1;
        String as1[];
        int l1;
        stringtokenizer = new StringTokenizer(f[i1], "=");
        k1 = stringtokenizer.countTokens();
        as1 = new String[k1];
        l1 = 0;
        if(k2 == 0) goto _L4; else goto _L3
_L3:
        as1[l1] = stringtokenizer.nextToken().trim();
        l1++;
_L4:
        if(l1 < k1) goto _L3; else goto _L5
_L5:
        String s2;
        int i2;
        s2 = as1[k1 - 1];
        i2 = 0;
        if(k2 == 0) goto _L7; else goto _L6
_L6:
        String s3 = as1[i2];
        int j2 = s3.indexOf(".");
        if(j2 == -1)
        {
            Object obj = d.put(s3, new f0(this, s2));
            if(k2 == 0)
                continue; /* Loop/switch isn't completed */
        }
        if(j2 == s3.length() - 1 || s3.lastIndexOf(".") != j2)
            a(z[0] + s3 + z[1] + f[i1] + "'");
        String s4 = s3.substring(0, j2).trim();
        String s5 = s3.substring(j2 + 1).trim();
        if(s4.equals(z[3]))
        {
            String s6 = a(s5, s2);
            if(k2 == 0)
                continue; /* Loop/switch isn't completed */
        }
        if(s4.equals(z[2]))
        {
            String s7 = b(s5, s2);
            if(k2 == 0)
                continue; /* Loop/switch isn't completed */
        }
        Component component = (Component)b.get(s4);
        d0 d0_2 = (d0)c.get(component);
        String s8 = d0_2.a(s5, s2);
        i2++;
_L7:
        if(i2 < k1 - 1) goto _L6; else goto _L8
_L8:
        i1++;
_L2:
        if(i1 < f.length) goto _L10; else goto _L9
_L9:
        int j1 = 0;
        if(k2 == 0) goto _L12; else goto _L11
_L11:
        String s;
        if(h[j1] != null)
            s = h[j1].i();
        j1++;
_L12:
        if(j1 < h.length) goto _L11; else goto _L13
_L13:
        Enumeration enumeration = c.elements();
        if(k2 == 0) goto _L15; else goto _L14
_L14:
        d0 d0_1 = (d0)enumeration.nextElement();
        String s1 = d0_1.h();
_L15:
        if(!enumeration.hasMoreElements())
            return;
        if(true) goto _L14; else goto _L16
_L16:
    }

    private String a(String s, String s1)
    {
label0:
        {
            int j1 = q;
            int i1;
            try
            {
                i1 = Integer.parseInt(s1);
            }
            catch(NumberFormatException _ex)
            {
                return z[22] + s + "'";
            }
            if(s.equals(z[21]))
            {
                m = new Integer(i1);
                if(j1 == 0)
                    break label0;
            }
            if(s.equals(z[20]))
            {
                n = new Integer(i1);
                if(j1 == 0)
                    break label0;
            }
            return z[0] + s + z[19] + z[3] + z[23];
        }
        return null;
    }

    private String b(String s, String s1)
    {
        int i1;
        int j1;
label0:
        {
label1:
            {
                j1 = q;
                try
                {
                    i1 = Integer.parseInt(s1);
                    break label0;
                }
                catch(NumberFormatException _ex) { }
                if(s.equals(z[6]))
                {
                    h[0] = new f0(this, s1);
                    if(j1 == 0)
                        break label1;
                }
                if(s.equals(z[7]))
                {
                    h[1] = new f0(this, s1);
                    if(j1 == 0)
                        break label1;
                }
                if(s.equals(z[8]))
                {
                    h[2] = new f0(this, s1);
                    if(j1 == 0)
                        break label1;
                }
                if(s.equals(z[15]))
                {
                    h[3] = new f0(this, s1);
                    if(j1 == 0)
                        break label1;
                }
                return z[0] + s + z[19] + z[2] + z[23];
            }
            return null;
        }
label2:
        {
            if(s.equals(z[6]))
            {
                i = new Integer(i1);
                if(j1 == 0)
                    break label2;
            }
            if(s.equals(z[7]))
            {
                j = new Integer(i1);
                if(j1 == 0)
                    break label2;
            }
            if(s.equals(z[8]))
            {
                k = new Integer(i1);
                if(j1 == 0)
                    break label2;
            }
            if(s.equals(z[15]))
            {
                l = new Integer(i1);
                if(j1 == 0)
                    break label2;
            }
            return z[0] + s + z[19] + z[2] + z[23];
        }
        return null;
    }

    private static char[] z(String str) {
        char ac[] = str.toCharArray();
        int clen = ac.length;
        if (clen >= 2)
            return ac;
        ac[0] ^= 0x7e;
        return ac;
    }

    private static String z(char[] chs) {
        for (int i = 0; i < chs.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key = 0x22;
                    break;
                case 1:
                    key = 34;
                    break;
                case 2:
                    key = 45;
                    break;
                case 3:
                    key = 58;
                    break;
                default:
                    key = 126;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static 
    {
        String as[] = new String[34];
        as[0] = z(z("rPBJ\033PVT\032Y"));
        as[1] = z(z("\005\002DI^KL[[\022KF\003\032D\002\005"));
        as[2] = z(z("NCTU\013V"));
        as[3] = z(z("AMCN\037KLHH"));
        as[4] = z(z("PKJR\n"));
        as[5] = z(z("NGKN"));
        as[6] = z(z("UKIN\026"));
        as[7] = z(z("JGD]\026V"));
        as[8] = z(z("OKCm\027FVE"));
        as[9] = z(z("VM]"));
        as[10] = z(z("FGK[\013NVe_\027EJY"));
        as[11] = z(z("AGCN\033Pz"));
        as[12] = z(z("@MYN\021O"));
        as[13] = z(z("AGCN\033P{"));
        as[14] = z(z("FGK[\013NVzS\032VJ"));
        as[15] = z(z("OKCr\033KEEN"));
        as[16] = z(z("oWAN\027RNH\032\035MO]U\020GLYI^UKYR^VJH\032\020COH\032Y"));
        as[17] = z(z("\002\030\r"));
        as[18] = z(z("\005\030\r"));
        as[19] = z(z("\005\002DI^LMY\032\bCND^^DM_\032\nJG\r\035"));
        as[20] = z(z("FGK[\013NVoU\nVM@j\037F"));
        as[21] = z(z("FGK[\013NV\177S\031JV}[\032"));
        as[22] = z(z("mLAC^CL\rS\020VGJ_\f\002ALT^@G\r[\rQKJT\033F\002YU^\005ABT\nCKC_\f\f"));
        as[23] = z(z("\005\002BX\024GAY\024"));
        as[24] = z(z("\002g\177h1p\030\r"));
        as[25] = z(z("rMZ_\fnCTU\013V\002"));
        as[26] = z(z("\005\002DI^LMY\032\037\002TLV\027F\002\177r-\002R_U\016GPYCP"));
        as[27] = z(z("\005ABT\nCKC_\f\f"));
        as[28] = z(z("\005CI^2C[BO\naM@J\021LGCNY\002ABT\rVPLS\020V\002@O\rV\002O_^C\002C[\023G\002~N\fKLJ"));
        as[29] = z(z("aMCI\nPCDT\nQ\002NU\013NF\rT\021V\002O_^PG^U\022TGI\032\tJKA_^FGY_\fOKCS\020E\002]H\033DG_H\033F\002^S\004G\f\r\035"));
        as[30] = z(z("\005\002E[\r\002LBN^@GHT^CFI_\032\002VB\032\nJG\rY\021LVLS\020GP\003"));
        as[31] = z(z("aM@J\021LGCN^\005"));
        as[32] = z(z("aMCI\nPCDT\nQ\002NU\013NF\rT\021V\002O_^PG^U\022TGI\000^"));
        as[33] = z(z("\023\f\034"));
        z = as;
    }
}